package io.renren.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.dao.QualHonorDao;
import io.renren.entity.QualHonorEntity;
import io.renren.service.QualHonorService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("qualHonorService")
public class QualHonorServiceImpl extends ServiceImpl<QualHonorDao, QualHonorEntity> implements QualHonorService {
    @Override
    public List<QualHonorEntity> getList(Map<String, Object> params) {
        QueryWrapper wrapper = new QueryWrapper<QualHonorEntity>();
        if (params.get("type") != null)
            wrapper.eq("type", String.valueOf(params.get("type")));
        wrapper.eq("enabled", 0);
        wrapper.orderByAsc("sort");
        return this.baseMapper.selectList(wrapper);
    }
}
